const initialState = {
  user: {},
  userProfile: {},
}
export const profile = (state = initialState, action) => {
  const { type, payload } = action
  if (type === 'profile/saveUser') {
    return {
      ...state,
      user: payload,
    }
  }
  if (type === 'profile/saveUserProfile') {
    return {
      ...state,
      userProfile: payload,
    }
  }
  return state
}
